package com.ny.zmb.openapi.constant;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class PHPConstant {

    @Value("${BASE_URL.FRONT}")
    public void setFrontUrl(String url){
        PHPConstant.FRONT_URL = url;
    }
    public static String FRONT_URL;


    // todo  php调用测试环境  正式环境需要替换
    @Value("${BASE_URL.PHP}")
    public void setBaseUrl(String baseUrl){
        PHPConstant.BASE_URL = baseUrl;
    }
    public static String BASE_URL;

    // todo java测试环境调用地址正式环境需替换
    @Value("${BASE_URL.JAVA}")
    public void setJavaBaseUrl(String javaBaseUrl){
        PHPConstant.JAVA_BASE_URL = javaBaseUrl;
    }
    public static String JAVA_BASE_URL;

    /**
     * 微信(支持payMode：28、29)
     */
    public static final String WX_bankType = "1902000";

    /**
     * 支付宝(支持payMode：26)
     */
    public static final String ALI_bankType = "1903000";

    /**
     * 银联(支持payMode：30)
     */
    public static final String YL_bankType = "9001002";

    /**
     * 29-微信小程序
     */
    public static final String WX_payModel = "29";

    /**
     * 26-支付宝生活号
     */
    public static final String ALI_payMode = "26";

    /**
     * 微信appid
     */
    public static final String APPID = "wx7c6ce8636ecfb807";

    /**
     * 微信秘钥
     */
    public static final String my = "642822fc2eba2e6d68ba0baec9ebdc92";

    /**
     * 微信url
     */
    public static final String wx_url = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=SECRET&js_code=JSCODE&grant_type=authorization_code";
}
